<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        canvas{
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <canvas id="canvas"></canvas>
</body>
</html>
<script>
    let canvas = document.getElementById('canvas')
    let gl = canvas.getContext('webgl')
    if (!gl) {
        console.log('不支持webgl');
    }
    gl.viewport(0,0,canvas.clientWidth,canvas.clientHeight);
    gl.clearColor(0.0,1.0,0.5,1.0);
    gl.clear(gl.COLOR_BUFFER_BIT);
</script>